

<?php $this->Js->get('#khoa')->event('change',
							$this->Js->request(array('controller' => 'ctdts', 'action' => 'capnhatnganhds'),
							array('update' => '#div_nganh','async' => true,
							'dataExpression' => true,'method' => 'post',
							'data' => $js->serializeForm(array('isForm' => false, 'inline' => true)))));?>
<?php $this->Js->get('#khoa')->event('change',
							$this->Js->request(array('controller' => 'ctdts', 'action' => 'capnhatctdt'),
							array('update' => '#div_noidung','async' => true,
							'dataExpression' => true,'method' => 'post',
							'data' => $js->serializeForm(array('isForm' => false, 'inline' => true)))));?>
<?php $this->Js->get('#div_nganh')->event('change',
							$this->Js->request(array('controller' => 'ctdts', 'action' => 'capnhatctdt'),
							array('update' => '#div_noidung','async' => true,
							'dataExpression' => true,'method' => 'post',
							'data' => $js->serializeForm(array('isForm' => false, 'inline' => true)))));?>
<?php $this->Js->get('#khoahoc')->event('change',
							$this->Js->request(array('controller' => 'ctdts', 'action' => 'capnhatctdt'),
							array('update' => '#div_noidung','async' => true,
							'dataExpression' => true,'method' => 'post',
							'data' => $js->serializeForm(array('isForm' => false, 'inline' => true)))));?>
							
<div id="tabs">
	<ul>
        <li id="current"><?php echo $this->Html->link(__('Danh sách CTĐT các khóa', true), array('controller'=>'ctdts','action' => 'dsctdt')); ?></li>
        <li><?php echo $this->Html->link(__('Thêm CTĐT', true), array('action' => 'themctdt')); ?></li>
	</ul>
 </div>							
							
							
<div class="ctdts index">
	<h2><?php __('Danh mục chương trình đào tạo');?></h2>
	<?php echo $form->create('Ctdt');?>
	<table>
		<tr>
			<td><?php echo $form->input('khoa',array('id'=>'khoa','label'=>'Khoa','type'=>'select','options'=>$khoas,'empty'=>'--Tất cả--','selected'=>$khoa));?></td>
			<td><div id='div_nganh'><?php echo $form->input('nganh',array('id'=>'nganh','label'=>'Ngành','type'=>'select','options'=>$nganhs,'empty'=>'--Tất cả--','selected'=>$nganh));?></div></td>
			<td><div id='div_khoahoc'><?php echo $form->input('khoahoc',array('id'=>'khoahoc','label'=>'Khóa Học','type'=>'select','options'=>$khoahocs,'empty'=>'--Tất cả--','selected'=>$khoahoc));?></div></td>
		</tr>
	</table>
	<?php echo $form->end();?>
	<div id='div_noidung'>
	<table cellpadding="0" cellspacing="0" id="tables">
	<tr>
			<th><?php echo 'STT'?></th>
			<th><?php echo 'Ngành';?></th>
			<th><?php echo 'Khóa học';?></th>
			<th class="actions"><?php __('Thao tác');?></th>
	</tr>
	<?php
	$i = 0;
	foreach ($ctdts as $ctdt):
		$class = null;
		if ($i++ % 2 == 0) {
			$class = ' class="altrow"';
		}
	?>
	<tr<?php echo $class;?>>
		<td><?php echo $i; ?>&nbsp;</td>
		<td>
			<?php echo $ctdt['Nganh']['tenNganh']; ?>
		</td>
		<td><?php echo $ctdt['Ctdt']['Khoa']; ?>&nbsp;</td>
		<td class="actions">
			<?php echo $this->Html->link(__('Chi tiết', true), array('controller'=>'nhomhps','action' => 'xemnhomhp', $ctdt['Ctdt']['id'])); ?>
			<?php //echo $this->Html->link(__('View', true), array('action' => 'view', $ctdt['Ctdt']['id'])); ?>
			<?php echo $this->Html->link(__('Sửa', true), array('action' => 'suactdt', $ctdt['Ctdt']['id'])); ?>
			<?php echo $this->Html->link(__('Xóa', true), array('action' => 'delete', $ctdt['Ctdt']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $ctdt['Ctdt']['id'])); ?>
		</td>
	</tr>
<?php endforeach; ?>
	</table>
	<p>
	<?php
	echo $this->Paginator->counter(array(
	'format' => __('Trang %page%/%pages%, hiện cả %count% mẫu tin', true)
	));
	?></p>

	<div class="paging">
		<?php echo $this->Paginator->prev('<< ' . __('Trước', true), array(), null, array('class'=>'disabled'));?>
	 | 	<?php echo $this->Paginator->numbers();?>
 |
		<?php echo $this->Paginator->next(__('Sau', true) . ' >>', array(), null, array('class' => 'disabled'));?>
	</div>
	</div>
</div>